package com.br.pfm.persistence.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;


@Entity
@Table(name="PFM_cliente")
public class Cliente implements Serializable {
	
	private static final long serialVersionUID = -8090952344006745473L;
	
	@Id
	@GeneratedValue
	@Column(name = "id_cliente", nullable = false, length = 2)
	private int idCliente;
	
	@Getter
    @Setter
	@Column(name = "nm_cliente", nullable = false, length = 30)
	private String nomeCliente;
	
	@Getter
    @Setter
	@Column(name = "pass", nullable = false, length = 10)
	private String passCliente;
	
	@Getter
	@Setter
	@OneToMany(cascade=CascadeType.ALL)
    @JoinColumn(name="id_cliente")
    private List<Instituicao> instituicoes;

}
